<?php
session_start();

	session_unregister("user_id");
	session_unregister("username");
	session_unregister("firstname");
	session_unregister("lastname");
	session_unregister("user_group_id");
	
	setcookie("user_id");
	setcookie("username");
	setcookie("firstname");
	setcookie("lastname");
	setcookie("user_group_id");
					
	session_write_close();
	
	echo "<script>window.location = 'index.php'</script>";
?>